﻿@model _1._2._2015FullCrud.Models.TodoIndexViewModel

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<table class="table table-bordered table-striped">
    <tr>
        <th>Text</th>
        <th>Date Created</th>
        <th>Completed</th>
        <th>Date complete</th>
        <th>Edit</th>
    </tr>
    @foreach (var todo in Model.Todos)
        
    {
        <tr>
            <td>@todo.Text</td>
            <td>@todo.DateCreated</td>
            <td>@todo.IsCompleted</td>
            <td>@todo.DateCompleted</td>
            <td>@Html.ActionLink("Edit", "Update", new { Id = todo.Id })</td>
        </tr>
    }


</table>